#include "rvfft.hpp"
#include "instr_printer.hpp"

#define PRINT(instruction, name)  \
printer.add_instr(rvfft::instruction, name)

int main()
{
  InstrPrinter printer("test.S");

  printer.add_line( "------------------------ test ------------------------");
  PRINT(complex_mul<0>(0b10000,0b11110), "complex_mul ");
  PRINT(complex_mul<1>(0b10000,0b11110), "complex_mul ");
  PRINT(complex_mul<2>(0b10000,0b11110), "complex_mul ");
  PRINT(shuffle_single (0b1001,0b10011,0b10101,0b11001), "shuffle_single ");
  PRINT(shuffle_double0(0b1001,0b10011,0b10101,0b11001), "shuffle_double0 ");
  PRINT(shuffle_double1(0b1001,0b10011,0b10101,0b11001), "shuffle_double1 ");
  PRINT(butterfly_single<0>(0b11111), "butterfly_single ");
  PRINT(butterfly_single<1>(0b11111), "butterfly_single ");
  PRINT(butterfly_double(0b11111,0), "butterfly_double ");
  PRINT(write_buffer(0b11111), "write_buffer ");
  PRINT(LDVEC<0>(0b11111,0b000000000000,0b01111), "LDVEC0");
  PRINT(LDVEC<1>(0b00000,0b111111111111,0b01111), "LDVEC1");
  PRINT(SDVEC<0>(0b11111,0,0b000000011111), "SDVEC0");
  PRINT(SDVEC<1>(0,0b11111,0b111111100000), "SDVEC1");
  PRINT(test_write<1>(0xffff,0x1f), "test_write1");
  PRINT(test_write<2>(0xffff,0x1f), "test_write2");
  PRINT(test_write<3>(0xffff,0x1f), "test_write3");
  PRINT(test_write<4>(0xffff,0x1f), "test_write4");
  PRINT(test_write<5>(0xffff,0x1f), "test_write5");
  PRINT(test_write<6>(0xffff,0x1f), "test_write6");
  PRINT(test_write<7>(0xffff,0x1f), "test_write7");
  PRINT(test_write<8>(0xffff,0x1f), "test_write8");
  printer.add_line( "------------------------ test ------------------------");
  printer.to_stdout();
  return 0;
}
